
package com.nvlled.route;

import java.net.SocketAddress;

public class RoutedObject implements java.io.Serializable {

    private static IDGenerator idGen = new IDGenerator();
    private long id;

    private String source;
    private SocketAddress sourceAddress;

    public RoutedObject() {
        id = idGen.nextId();
    }

    public RoutedObject(long id) {
        this.id = id;
    }

    public long getId() {
        return id;
    }

    public void setSourceAddress(SocketAddress address) {
        sourceAddress = address;
    }

    public SocketAddress getSourceAddress() {
        return sourceAddress;
    }

    public void setSource(String name) {
        source = name;
    }

    public String getSource() {
        return source;
    }
}

